home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4892 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1019 b 

  1. Path: news.uni-jena.de!news
  2. From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Visibility Restricted to Compiler
  5. Date: 1 Feb 1996 14:35:14 GMT
  6. Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
  7. Message-ID: <4eqj32$na8@fsuj01.rz.uni-jena.de>
  8. References: <4eq8td$hpu@vixen.cso.uiuc.edu>
  9. Reply-To: mkt@isun04.inf.uni-jena.de
  10. NNTP-Posting-Host: isun07.inf.uni-jena.de
  11.  
  12. In article hpu@vixen.cso.uiuc.edu, sjmccaug@prairienet.org (Scott J. McCaughrin) writes:
  13. >  Is a constructor still visibile to a C++ compiler if it is private? I
  14. >  want a constructor invoked only by compiler, and not e.g. by some
  15. >  user-defined 'new'.
  16.  
  17. I think there is no way of expressing: the constructor may only invoked
  18. by the compiler. The user can easily write code that implicitly invokes
  19. the constructor.
  20. The other thing: The private constructor is still visible, but not
  21.         accessable. And there is still no difference between
  22.         an implicit and an explicit constructor call!
  23.  
  24.  
  25.  
  26.  
  27.